﻿using System;
using System.Collections.Generic;
using System.Text;
using Imple.Parse;

namespace Imple.Ex
{
    class NodeLevelNotContinousException : RSSException
    {
        private ParseNode _previous;
        private ParseNode _current;

        public NodeLevelNotContinousException(ParseNode previous, ParseNode current)
        {
            _previous = previous;
            _current = current;
        }

        public override string Message
        {
            get
            {
                return string.Format("adding node {0}'s level is not successive to current {1}\nShould be less or same as {2}", _current, _previous, _previous.Level + 1);
            }
        }
    }
}
